﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FluentNHibernate.Mapping;

namespace AssetAllocationSystem.Models.Mapping
{
    public class AssetMapping : ClassMap<Asset>
    {
        public AssetMapping()
        {
            Table("Asset");
            Id(a => a.Id);
            Map(a => a.ServiceKey);
            Map(a => a.Configuration);
            Map(a => a.IsAvailable);
            References(a => a.Company).Column("Company_Id");
            References(a => a.Location).Column("Location_Id");
            References(a => a.Employee).Column("Employee_Id");
            References(a => a.Request).Column("Request_Id");
        }
    }
}